import React, { Component } from 'react'
import styles from './child1.module.css'
import classNames from 'classnames'

export default class extends Component {
  state = {
    isShow: false
  }
  render () {
    return (
      <div>
        <p style={{ fontSize: 22, color: 'gray' }}>行内样式</p>
        <p
          className={classNames(styles.tet, { [styles.tp]: this.state.isShow })}
        >
          外部样式
        </p>
        <p className={classNames([styles['my-text']])}>外部样式二</p>
        <p>
          <button
            onClick={() => {
              this.setState({
                isShow: !this.state.isShow
              })
            }}
          >
            更改
          </button>
        </p>
      </div>
    )
  }
}
